import requestes from "../../utils/requestes"
enum API {
    //直播课分类接口
    LIVECATE = '/moment/properties/filter/live_course?access_token=',
    //直播视频接口--默认综合排序
    LIVECOURSE = '/moment/moments/collect/live_course/integrated?access_token=',
    // 销量
    SALE = '/moment/moments/collect/live_course/sellCountDesc?access_token=', 
    // 浏览
    GLANCE = '/moment/moments/collect/live_course/viewCountDesc?access_token=',
    // 价格高到低
    PRICETOP = '/moment/moments/collect/live_course/priceDesc?access_token=',
    // 价格低到高
    PRICELOD = '/moment/moments/collect/live_course/priceAsc?access_token=',
    // 开课时间
    COURSEOPEN ='/moment/moments/collect/video_course/startTimeAsc?access_token='
}
const access_token = 'fc69476c-1f1f-4b12-9d0f-4ec70d931284'
// 直播分类接口
export const reqLiveCate = ()=>requestes.get(API.LIVECATE+access_token)
// 直播视频接口
export const reqLiveCourse = (pageSize:number,pageNum:number,filter)=>requestes.post(API.LIVECOURSE+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,filter)
// 销量由高到低接口
export const reqSale = (pageSize:number,pageNum:number)=>requestes.post(API.SALE+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 浏览量
export const reqGlance = (pageSize:number,pageNum:number)=>requestes.post(API.GLANCE+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 发布时间
export const reqTime = (pageSize:number,pageNum:number)=>requestes.post(API.COURSEOPEN+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 价格降序
export const reqToplod = (pageSize:number,pageNum:number)=>requestes.post(API.PRICETOP+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
// 价格升序
export const reqLodtop = (pageSize:number,pageNum:number)=>requestes.post(API.PRICELOD+access_token+`&pageSize=${pageSize}&pageNum=${pageNum}`,{})
